<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>123酒店前台管理</title>
</head>
<?php
header ( 'Content-type: text/html; charset=utf-8' );
$name = $_POST ['name'];

$mysql_server_name = "localhost";
$mysql_username = "root";
$mysql_password = "root";
$mysql_database = "db_shop";

$conn = mysql_connect ( $mysql_server_name, $mysql_username, $mysql_password );
mysql_query ( "set names 'utf8'" );

$sql = "select * from member where name like '%$name%' ORDER BY member_id ASC";
// require_once('page.php');
// page($sql,'room.php',"5");//这几个是分页的句子
// $sql = " SELECT * FROM room ORDER BY room_id DESC limit".$begincount.",".$rows;
mysql_select_db ( $mysql_database );
$result = mysql_query ( $sql );

?>
<body>
	<table width="100%" border="0" align="center" cellpadding="0"
		cellspacing="0">
		<tr>
			<td height="30">
				<table width="100%" border="0" cellspacing="0" cellpadding="0">
					<tr>
						<td height="24" bgcolor="#6699ff">
							<table width="100%" border="0" cellspacing="0" cellpadding="0">
								<tr>
									<td bordercolor="#0072FF">
										<table width="100%" border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td width="6%" height="19" valign="bottom">
													<div align="center"></div>
												</td>
												<td width="94%" valign="bottom"><span class="STYLE1">会员信息</span>
												</td>
											</tr>
										</table>
									</td>
									<td>
										<div align="right">
											<span class="STYLE1">&nbsp;</span> <span class="STYLE1">&nbsp;</span>
										</div>
									</td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
			</td>
		</tr>
		<tr>
			<td bordercolor="#FFFFFF"><table width="100%" border="0"
					cellpadding="0" cellspacing="1" bgcolor="#a8c7ce">
					<tr>
						<td width="11%" height="20" bgcolor="d3eaef" class="STYLE6">
							<div align="center">
								<span class="STYLE10">姓名</span>
							</div>
						</td>
						<td width="11%" height="20" bgcolor="d3eaef" class="STYLE6">
							<div align="center">
								<span class="STYLE10">性别</span>
							</div>
						</td>
						<td width="13%" height="20" bgcolor="d3eaef" class="STYLE6">
							<div align="center">
									<span class="STYLE10">证件类型</span>
							</div>
						</td>
						<td width="15%" height="20" bgcolor="d3eaef" class="STYLE6">
							<div align="center">
								<span class="STYLE10">证件编号</span>
							</div>
						</td>
						<td width="11%" height="20" bgcolor="d3eaef" class="STYLE6">
							<div align="center">
								<span class="STYLE10">会员编号</span>
							</div>
						</td>
						<td width="11%" height="20" bgcolor="d3eaef" class="STYLE6">
							<div align="center">
								<span class="STYLE10">积分</span>
							</div>
						</td>
						<td width="15%" height="20" bgcolor="d3eaef" class="STYLE6">
							<div align="center">
								 <span class="STYLE10">联系方式</span>
							</div>
						</td>
						<td width="15%" height="20" bgcolor="d3eaef" class="STYLE6">
							<div align="center">
								<span class="STYLE10">操作</span>
							</div>
						</td>
					</tr>
	  			<?php
				while ( $row = mysql_fetch_array ( $result, MYSQL_ASSOC ) ) // //加入了MYSQL_ASSOC,就相当于fetch_assoc（）,只能传出数字下标的类型
				{
				?>
					<tr>
						<td height="20" bgcolor="#FFFFFF" class="STYLE19">
							<div align="center"><?php echo $row['name'];?></div>
						</td>
						<td height="20" bgcolor="#FFFFFF" class="STYLE19">
							<div align="center"><?php echo $row['gender'];?></div>
							</td>
						<td height="20" bgcolor="#FFFFFF" class="STYLE19">
							<div align="center"><?php echo $row['document_type'];?></div>
						</td>
						<td height="20" bgcolor="#FFFFFF" class="STYLE19">
							<div align="center"><?php echo $row['document_id'];?>
							</div>
						</td>
						<td height="20" bgcolor="#FFFFFF" class="STYLE19">
							<div align="center"><?php echo $row['member_id'];?>
							</div>
						</td>
						<td height="20" bgcolor="#FFFFFF" class="STYLE19">
							<div align="center"><?php echo $row['cumulative'];?></div>
						</td>
						<td height="20" bgcolor="#FFFFFF" class="STYLE19">
							<div align="center"><?php echo $row['telphone'];?></div>
						</td>
						<td height="20" bgcolor="#FFFFFF" class="STYLE19">
							<div align="center">
								<a href="memberupdate.php?id=<?php echo $row['member_id'];?>">修改</a>&nbsp;
								<a href="member_delete.php?id=<?php echo $row['member_id'];?>">删除</a>
							</div>
						</td>
					</tr>
		  			<?php
					}
					?>	  
	    		</table>
	    	</td>
		</tr>
		<tr>
			<td colspan="8" align="center" bgcolor="#FFFFFF">
				<input name="button" type="button" value="返回到查询页面"
					onClick="javascript:window.location='member.php'" />
			</td>
		</tr>
	</table>
</body>
</html>
